package com.joysuch.wwyt.core.enums;

/**
 * 健康状况
 * @Author ZhangDong
 * @Date 2020/12/22 13:27
 */
public enum HealthStatusTypes {

    JKZK_JK(1425, "健康"),
    JKZK_LH(1426, "良好"),
    JKZK_YJK(1427, "亚健康"),
    JKZK_HB(1428, "患病");

    private Integer id;
    private String healthStatus;

    HealthStatusTypes(Integer id, String healthStatus) {
        this.id = id;
        this.healthStatus = healthStatus;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getHealthStatus() {
        return healthStatus;
    }

    public void setHealthStatus(String healthStatus) {
        this.healthStatus = healthStatus;
    }

    public static Integer getId(String healthStatus) {
        HealthStatusTypes[] values = HealthStatusTypes.values();
        for (HealthStatusTypes value : values) {
            if (value.healthStatus.equals(healthStatus)) {
                return value.id;
            }
        }
        return null;
    }

}
